package com.wicket.okrapp.web.contorller;

import com.github.pagehelper.Page;
import com.wicket.okrapp.biz.service.SmallCircleCommonService;
import com.wicket.okrapp.biz.service.dto.req.*;
import com.wicket.okrapp.biz.service.dto.res.*;
import com.wicket.okrapp.common.ro.OkrResult;
import com.wicket.okrapp.common.util.CommonFunctionHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@RestController
@RequestMapping("/app/smallCircleCommon/")
public class SmallCircleCommonController {

  @Autowired
  SmallCircleCommonService smallCircleCommonService;
/**
   * B3查询虚拟组织下的人员列表(管理)
   */
    @PostMapping("queryPersopnOfVirtualOrgList")
    public OkrResult<QueryPersopnOfVirtualOrgListRespDto> queryPersopnOfVirtualOrgList(@RequestBody @Validated QueryPersopnOfVirtualOrgListReqDto reqDTO){
    return OkrResult.success(smallCircleCommonService.queryPersopnOfVirtualOrgList(reqDTO));
    }
/**
   * D3查询我身份所在小圈子列表(公共)
   */
    @PostMapping("queryIdentitySmallCircleListCom")
    public OkrResult<QueryIdentitySmallCircleListComRespDto> queryIdentitySmallCircleListCom(@RequestBody @Validated QueryIdentitySmallCircleListComReqDto reqDTO){
    Page<?> page = CommonFunctionHelper.startPage(reqDTO.getPageNum(),reqDTO.getPageSize());

        QueryIdentitySmallCircleListComRespDto retData = smallCircleCommonService.queryIdentitySmallCircleListCom(reqDTO);

        retData.setPageNum(page.getPageNum());
        retData.setPageSize(page.getPageSize());
        retData.setTotalNum(page.getTotal());
        return OkrResult.success(retData);
    
    }
/**
   * D3查询我下属负责的小圈子列表(公共)
   */
    @PostMapping("querySubordinateChargeSmallCircleListCom")
    public OkrResult<QuerySubordinateChargeSmallCircleListComRespDto> querySubordinateChargeSmallCircleListCom(@RequestBody @Validated QuerySubordinateChargeSmallCircleListComReqDto reqDTO){
    return OkrResult.success(smallCircleCommonService.querySubordinateChargeSmallCircleListCom(reqDTO));
    }
/**
   * D3查询我部门所在小圈子列表(公共)
   */
    @PostMapping("queryDeptSmallCircleListCom")
    public OkrResult<QueryDeptSmallCircleListComRespDto> queryDeptSmallCircleListCom(@RequestBody @Validated QueryDeptSmallCircleListComReqDto reqDTO){
    return OkrResult.success(smallCircleCommonService.queryDeptSmallCircleListCom(reqDTO));
    }
/**
   * D3查询我部门负责的小圈子列表(公共)
   */
    @PostMapping("queryDeptChargeSmallCircleListCom")
    public OkrResult<QueryDeptChargeSmallCircleListComRespDto> queryDeptChargeSmallCircleListCom(@RequestBody @Validated QueryDeptChargeSmallCircleListComReqDto reqDTO){
    return OkrResult.success(smallCircleCommonService.queryDeptChargeSmallCircleListCom(reqDTO));
    }
/**
   * D3查询我相关的主题内容列表(公共)
   */
    @PostMapping("queryMyRelateThemeConListCom")
    public OkrResult<QueryMyRelateThemeConListComRespDto> queryMyRelateThemeConListCom(@RequestBody @Validated QueryMyRelateThemeConListComReqDto reqDTO){
    return OkrResult.success(smallCircleCommonService.queryMyRelateThemeConListCom(reqDTO));
    }
/**
   * D3查询评价模板下的部门列表(公共)
   */
    @PostMapping("queryDeptOfEvalutionListCom")
    public OkrResult<QueryDeptOfEvalutionListComRespDto> queryDeptOfEvalutionListCom(@RequestBody @Validated QueryDeptOfEvalutionListComReqDto reqDTO){
    return OkrResult.success(smallCircleCommonService.queryDeptOfEvalutionListCom(reqDTO));
    }
/**
   * D3查询主管我下属小圈子列表(公共)
   */
    @PostMapping("queryChargeSubordinateSmallCircleListCom")
    public OkrResult<QueryChargeSubordinateSmallCircleListComRespDto> queryChargeSubordinateSmallCircleListCom(@RequestBody @Validated QueryChargeSubordinateSmallCircleListComReqDto reqDTO){
    return OkrResult.success(smallCircleCommonService.queryChargeSubordinateSmallCircleListCom(reqDTO));
    }
/**
   * D3查询部门下人员去重列表(公共)
   */
    @PostMapping("queryDeptMemberDedupListCom")
    public OkrResult<QueryDeptMemberDedupListComRespDto> queryDeptMemberDedupListCom(@RequestBody @Validated QueryDeptMemberDedupListComReqDto reqDTO){
    return OkrResult.success(smallCircleCommonService.queryDeptMemberDedupListCom(reqDTO));
    }
/**
   * D3查询下属小圈子去重列表(公共)
   */
    @PostMapping("queryUbordinateSmallCirclRemDupListCom")
    public OkrResult<QueryUbordinateSmallCirclRemDupListComRespDto> queryUbordinateSmallCirclRemDupListCom(@RequestBody @Validated QueryUbordinateSmallCirclRemDupListComReqDto reqDTO){
    return OkrResult.success(smallCircleCommonService.queryUbordinateSmallCirclRemDupListCom(reqDTO));
    }
/**
   * D3查询主管我下属小圈子去重列表(公共)
   */
    @PostMapping("queryChargeSubordinateSmallCircleRemDupListCom")
    public OkrResult<QueryChargeSubordinateSmallCircleRemDupListComRespDto> queryChargeSubordinateSmallCircleRemDupListCom(@RequestBody @Validated QueryChargeSubordinateSmallCircleRemDupListComReqDto reqDTO){
    return OkrResult.success(smallCircleCommonService.queryChargeSubordinateSmallCircleRemDupListCom(reqDTO));
    }
/**
   * D3批量查询小圈子By内容(公共)
   */
    @PostMapping("batchQuerySmallCircleByEntityIdCom")
    public OkrResult<BatchQuerySmallCircleByEntityIdComRespDto> batchQuerySmallCircleByEntityIdCom(@RequestBody @Validated BatchQuerySmallCircleByEntityIdComReqDto reqDTO){
    return OkrResult.success(smallCircleCommonService.batchQuerySmallCircleByEntityIdCom(reqDTO));
    }
/**
   * D3查询部门小圈子By内容列表(公共)
   */
    @PostMapping("queryDeptSmallCircleByEntityIdListCom")
    public OkrResult<QueryDeptSmallCircleByEntityIdListComRespDto> queryDeptSmallCircleByEntityIdListCom(@RequestBody @Validated QueryDeptSmallCircleByEntityIdListComReqDto reqDTO){
    return OkrResult.success(smallCircleCommonService.queryDeptSmallCircleByEntityIdListCom(reqDTO));
    }
/**
   * D3批量查询小圈子身份人员信息by内容(公共)
   */
    @PostMapping("batchQuerySmallCircleOriRoleMemInfoCom")
    public OkrResult<BatchQuerySmallCircleOriRoleMemInfoComRespDto> batchQuerySmallCircleOriRoleMemInfoCom(@RequestBody @Validated BatchQuerySmallCircleOriRoleMemInfoComReqDto reqDTO){
    return OkrResult.success(smallCircleCommonService.batchQuerySmallCircleOriRoleMemInfoCom(reqDTO));
    }
/**
   * D3查询当前指标及一级指标等详情(公共)
   */
    @PostMapping("queryCurObjectiveAndOneLevelEtcDetailCom")
    public OkrResult<QueryCurObjectiveAndOneLevelEtcDetailComRespDto> queryCurObjectiveAndOneLevelEtcDetailCom(@RequestBody @Validated QueryCurObjectiveAndOneLevelEtcDetailComReqDto reqDTO){
    return OkrResult.success(smallCircleCommonService.queryCurObjectiveAndOneLevelEtcDetailCom(reqDTO));
    }
/**
   * D3查询目标内容部门小圈子详情(公共)
   */
    @PostMapping("queryTargetContDeptSmallCircleDetailCom")
    public OkrResult<QueryTargetContDeptSmallCircleDetailComRespDto> queryTargetContDeptSmallCircleDetailCom(@RequestBody @Validated QueryTargetContDeptSmallCircleDetailComReqDto reqDTO){
    return OkrResult.success(smallCircleCommonService.queryTargetContDeptSmallCircleDetailCom(reqDTO));
    }
/**
   * D3查询目标内容成员小圈子详情(公共)
   */
    @PostMapping("queryTargetContMemberSmallCircleDetailCom")
    public OkrResult<QueryTargetContMemberSmallCircleDetailComRespDto> queryTargetContMemberSmallCircleDetailCom(@RequestBody @Validated QueryTargetContMemberSmallCircleDetailComReqDto reqDTO){
    return OkrResult.success(smallCircleCommonService.queryTargetContMemberSmallCircleDetailCom(reqDTO));
    }
/**
   * D3查询当前指标相关部门(公共)
   */
    @PostMapping("queryCurObjectiveRelateDeptDetailCom")
    public OkrResult<QueryCurObjectiveRelateDeptDetailComRespDto> queryCurObjectiveRelateDeptDetailCom(@RequestBody @Validated QueryCurObjectiveRelateDeptDetailComReqDto reqDTO){
    return OkrResult.success(smallCircleCommonService.queryCurObjectiveRelateDeptDetailCom(reqDTO));
    }
/**
   * D3查询目标内容部门小圈子列表(公共)
   */
    @PostMapping("queryTargetContDeptSmallCircleListCom")
    public OkrResult<QueryTargetContDeptSmallCircleListComRespDto> queryTargetContDeptSmallCircleListCom(@RequestBody @Validated QueryTargetContDeptSmallCircleListComReqDto reqDTO){
    return OkrResult.success(smallCircleCommonService.queryTargetContDeptSmallCircleListCom(reqDTO));
    }
/**
   * D3分析身份人员问题小圈子(公共)
   */
    @PostMapping("analysisRoleMemberQuestionSmallCircleCom")
    public OkrResult<AnalysisRoleMemberQuestionSmallCircleComRespDto> analysisRoleMemberQuestionSmallCircleCom(@RequestBody @Validated AnalysisRoleMemberQuestionSmallCircleComReqDto reqDTO){
    return OkrResult.success(smallCircleCommonService.analysisRoleMemberQuestionSmallCircleCom(reqDTO));
    }
}
